import { BLOG_SITE } from '@/config'
import { COMMENT_GUESTBOOK_POST_ID } from '@/constants/comment'

export const getBlogArticleUrl = (articleId: number) => {
  return `${BLOG_SITE}/article/${articleId}`
}

export const getFETagPath = (tagSlug: string) => {
  return `${BLOG_SITE}/tag/${tagSlug}`
}

export const getBlogCategoryUrl = (categorySlug: string) => {
  return `${BLOG_SITE}/category/${categorySlug}`
}

export const getBlogGuestbookUrl = () => {
  return `${BLOG_SITE}/guestbook`
}

export const getBlogURLByPostID = (postID: number) => {
  return postID === COMMENT_GUESTBOOK_POST_ID ? getBlogGuestbookUrl() : getBlogArticleUrl(postID)
}
